package ch7.ex2;

import java.util.Arrays;
import java.util.Vector;

import ch3.Sex;
import ch3.Student;

public class ClsTest {

	public static void main(String[] args) throws Exception {
		// c就是描述Vector类的类 对象
		Class c0 = int.class;

		Class c = Vector.class;
		// Hashtable他的父类和实现的接口
		System.out.println("Vector的父类和接口如下：");
		System.out.println(c.getSuperclass().getName());
		Class cr[] = c.getInterfaces();
		for (Class cc : cr)
			System.out.println(cc);
		// System.out.println(Arrays.toString(cr));
		Class c2 = String.class;
		Class c3 = Student.class;
		// 对象getClass方法
		Student st = new Student("老吴", Sex.女);
		Class c4 = st.getClass();
		Class c5 = Class.forName("ch3.Student");
		System.out.println(c3 == c4);
		System.out.println(c4 == c5);
	}

}
